package com.trkj.vo;

import com.alibaba.fastjson.annotation.JSONField;

public class FunctionVo implements Comparable<FunctionVo> {
	@JSONField(name = "id")
	private Long funId;
	
	@JSONField(name = "text")
	private String funName;
	
	@JSONField(name = "checked")
	private String selected;
	
	public Long getFunId() {
		return funId;
	}

	public void setFunId(Long funId) {
		this.funId = funId;
	}

	public String getFunName() {
		return funName;
	}

	public void setFunName(String funName) {
		this.funName = funName;
	}

	public String getSelected() {
		return selected;
	}

	public void setSelected(String selected) {
		this.selected = selected;
	}

	public FunctionVo(Long funId, String funName) {
		super();
		this.funId = funId;
		this.funName = funName;
	}

	public FunctionVo(Long funId, String funName, String selected) {
		super();
		this.funId = funId;
		this.funName = funName;
		this.selected = selected;
	}

	 @Override
	    public int hashCode() {
	        final int prime = 31;
	        int result = 1;
	        result = prime * result + ((funId == null) ? 0 : funId.hashCode());
	        return result;
	    }

	    @Override
	    public boolean equals(Object obj) {
	        if (this == obj)
	            return true;
	        if (obj == null)
	            return false;
	        if (getClass() != obj.getClass())
	            return false;
	        FunctionVo other = (FunctionVo) obj;
	        if (funId == null) {
	            if (other.funId != null)
	                return false;
	        } else if (!funId.equals(other.funId))
	            return false;
	        return true;
	    }
	@Override
	public int compareTo(FunctionVo o) {
		return  (int) (this.getFunId() - o.getFunId());
	}

	

}
